import { IsEnum, IsOptional, MaxLength, MinLength } from 'class-validator'
import { Gender } from '../enums/gender.enum'

export class CreateProfileDto {
  @MinLength(2, { message: '昵称长度最小为 2 位' })
  @MaxLength(10, { message: '昵称长度最大为 10 位' })
  @IsOptional()
  nickname?: string

  @IsOptional()
  avatar?: string

  @IsEnum(Gender, { message: '性别格式错误' })
  @IsOptional()
  gender?: Gender
}
